package com.galaxy.payment.api;

import com.galaxy.common.core.domain.R;
import com.galaxy.common.core.validate.EditGroup;
import com.galaxy.payment.config.FeignConfig;
import com.galaxy.payment.domain.OrderBo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.math.BigDecimal;

/**
 * 商品服务接口
 */
@FeignClient(
    contextId = "RemoteUserPayService",
    value = "galaxy-user",
    fallbackFactory = RemoteOrderFallbackFactory.class,
    configuration = FeignConfig.class
)
public interface RemoteUserService {

    /**
     * 修改库存
     *
     * @return 商品信息
     */
    @GetMapping("/api/userInfo/getOpen/{id}")
    R<String> getOpenid(@PathVariable Long id) ;


    @PutMapping("/api/account/updateBalance")
    R<Boolean> updateBalance(@RequestParam("userId")Long userId, @RequestParam("balance") BigDecimal balance);

    @PutMapping("/api/account/updatePoints1")
    R<Boolean> updatePoints(@RequestParam("userId")Long userId, @RequestParam("points") Integer points);
}
